package JVM;

import java.net.URL;
import java.net.URLClassLoader;

/**
 * @author:谢君臣
 * @Date:2021/8/31-10:21
 * @version:1.0
 * @function:
 */
public class 类加载器 {
    public static void main(String[] args) {
        URLClassLoader loader = (URLClassLoader) 类加载器.class.getClassLoader().getParent();
        System.out.println(loader);
        URL[] urLs = loader.getURLs();
        for (URL urL : urLs) {
            System.out.println(urL);
        }
        System.out.println("----------------------");
        URLClassLoader classLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();
        System.out.println(classLoader);
        URL[] urLss = classLoader.getURLs();
        for (URL urL : urLss) {
            System.out.println(urL);
        }

    }
}
